package cn.com.nou.common.dao;

import cn.com.nou.common.entity.NouEnumerationT;
import com.google.common.collect.Maps;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;
import java.util.Map;

public class CommonEnumerationDAO extends SqlSessionDaoSupport {


    public List<NouEnumerationT> getEnumeration(List<String> enumTypes, List<String> codeList) {
        Map<String, Object> map = Maps.newHashMap();
        map.put("types", enumTypes);
        map.put("codeList", codeList);
        return getSqlSession().selectList("cn.com.nou.common.dao.CommonEnumerationDAO.selectEnumeration", map);
    }

    public List<NouEnumerationT> getEnumeration(List<String> codeIdList) {
        Map<String, Object> map = Maps.newHashMap();
//        map.put("types", enumTypes);
        map.put("codeIdList", codeIdList);
        return getSqlSession().selectList("cn.com.nou.common.dao.CommonEnumerationDAO.selectEnumerationById", map);
    }

	public List<NouEnumerationT> selectEnumerationByType(String type) {
		return getSqlSession().selectList("cn.com.nou.common.dao.CommonEnumerationDAO.selectEnumerationByType", type);
	}
}
